home *** CD-ROM | disk | FTP | other *** search
/ Cracking 2 / Cracking II..iso / Texty / crackme / reverse.asm < prev    next >
Encoding:
Assembly Source File  |  1999-07-20  |  1.7 KB  |  64 lines

  1. ; this baby takes about 16 minutes to get you
  2. ; the only valid serial, i have a p450... BTW
  3. ; i was on the irc while 'twas working without
  4. ; great speed loss (well if u compare this code
  5. ; with the one used in the program u can see why
  6. ; btw i used 32b app coz wsprintfA is quicker
  7. ; than coding my own dec to ascii function :)
  8.  
  9. .486
  10. .MODEL FLAT, STDCALL
  11.  
  12. wsprintfA PROTO C :DWORD,:DWORD,:DWORD
  13.  
  14. .data
  15.  
  16. wsdec   db "%010lu",0
  17. output  db 20 dup (0)
  18. fpu1     real8 0
  19. fpu2     real8 0
  20. hold     dd 0
  21.  
  22. .code
  23.  
  24. main:
  25.     mov [hold], 7fffffffh - 1        ; this equals to half of the possible combinations
  26.     a:                    ; since i had 2 pc's one started testing from 0,
  27.     inc dword ptr [hold]        ; this one started at half (to decrease time)
  28.     mov eax, [hold]
  29.     push eax
  30.     call wsprintfA, offset output, offset wsdec, eax
  31.     pop eax
  32.     xor ebx, ebx
  33.     xor esi, esi
  34.     b:
  35.     movsx ecx, byte ptr [output+ebx]
  36.     cmp ecx, 0
  37.     je c
  38.     add esi, ecx
  39.     inc ebx
  40.     jmp b
  41.     c:
  42.     cmp esi, 20Dh            ; this is where laz made his mistake...
  43.     jne a                ; this way we spare some time by not executing
  44.     mov dword ptr [fpu1], eax        ; all the following code and go to next number
  45.     fild qword ptr [fpu1]
  46.     fsqrt
  47.     fistp qword ptr [fpu2]
  48.     mov eax, dword ptr [fpu2]
  49.     mov ecx, 02
  50.     xor edx, edx
  51.     div ecx
  52.     or eax, 7Bh
  53.     shl eax, 05
  54.     lea eax, dword ptr [eax+4*eax]
  55.     lea eax, dword ptr [eax+4*eax]
  56.     lea eax, dword ptr [eax+4*eax]
  57.     lea eax, dword ptr [eax+4*eax]
  58.     lea eax, dword ptr [eax+4*eax]
  59.     add eax, 0322F5A4h
  60.     mov edx, [hold]
  61.     cmp eax, edx
  62.     jne a
  63.     int 3                ; when u break here ur lucky! '? edx' and u got it...
  64. end main